import { Column, Entity, Index } from "typeorm";

@Index("idx_sud_dep_id", ["depId"], {})
@Index("idx_sud_user_dep_id", ["userId", "depId"], {})
@Index("idx_sud_user_id", ["userId"], {})
@Entity("sys_user_depart", { schema: "workflow" })
export class SysUserDepart {
    @Column("char", { primary: true, name: "ID", comment: "id", length: 36 })
    id: string;

    @Column("char", {
        name: "user_id",
        nullable: true,
        comment: "用户id",
        length: 36,
    })
    userId: string | null;

    @Column("char", {
        name: "dep_id",
        nullable: true,
        comment: "部门id",
        length: 36,
    })
    depId: string | null;
}
